package br.com.jspl.app.devices;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.Icon;

public class ComponenteAction extends AbstractAction {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 2025509344855057363L;
	private Componente target;
	public ComponenteAction(String nome, Icon icone,Componente comp) {
		putValue(Action.NAME,nome);
		putValue(Action.SMALL_ICON ,icone);
		target = comp;
	}

	public void actionPerformed(ActionEvent evt) {
		(target.getProtoboard()).getPonteiro().AtivaPonteiro(target);
	}
}
